#define _CRT_SECURE_NO_WARNINGS 1
#include"stdio.h"
typedef struct type_sc
{
	int i;
	int a[];
};
int main()
{
	struct type_sc* p = (struct type_sc*)malloc(sizeof(struct type_sc) + 10 * sizeof(int));
	if (p == NULL)
	{
		perror("malloc");
		return 1;
	}
	int i = 0;
	p->i = 100;
	for (i = 0; i < 10; i++)
	{
		p->a[i] = i;
	}
	struct type_sc* ptr = (struct type_sc*)realloc(p, sizeof(struct type_sc) + 15 * sizeof(int));
	if (ptr != NULL)
	{
		p = ptr;
		ptr = NULL;
	}
	else
	{
		perror(realloc);
		return 1;
	}
	free(p);
	p = NULL;
	return 0;
}